package com.itheima.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.health.pojo.CheckGroup;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @program: health_paret
 * @description:
 * @author: Mr.Wang
 * @create: 2020-11-03 20:20
 **/
public interface CheckGroupMapper extends BaseMapper<CheckGroup> {
    @Insert("insert into t_checkgroup_checkitem values (#{gid},#{iid})")
    void addCheckGroupandCheckitem(@Param("gid") Integer gid, @Param("iid") Integer iid);

    @Select("select  CHECKITEM_ID from t_checkgroup_checkitem where CHECKGROUP_ID=#{id}")
    int[] findCheckitemInfoCheckGroup(Integer id);

    @Delete("delete from t_checkgroup_checkitem  where CHECKGROUP_ID= #{id}")
    void delete(int id);
}
